﻿<phone:PhoneApplicationPage
    x:Class="MVBuddy.View.SettingsPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
    xmlns:MVBuddy_Common_Controls="clr-namespace:MVBuddy.Common.Controls;assembly=MVBuddy.Common"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d"
    shell:SystemTray.IsVisible="True">

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" DataContext="{Binding Source={StaticResource Locator}}" Style="{StaticResource MVPageStyle}">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

		<MVBuddy_Common_Controls:PageHeaderControl d:LayoutOverrides="Height"/>

        <!--ContentPanel - place additional content here-->
        <Grid x:Name="ContentPanel" Grid.Row="1">
        	<StackPanel Margin="24,12,0,0">
        		<toolkit:ToggleSwitch x:Name="toggleSaveLogin" IsChecked="{Binding Main.SaveLogin, Mode=TwoWay}" Style="{StaticResource ToggleSwitchTemplate}" Header="{Binding Path=LocalizedResources.SaveLogin, Source={StaticResource LocalizedStrings}}" Margin="0,0,24,0" />
				<toolkit:ToggleSwitch x:Name="toggleBackgroundTask" IsChecked="{Binding Main.EnableAgent, Mode=TwoWay}" Style="{StaticResource ToggleSwitchTemplate}" IsEnabled="{Binding IsChecked, ElementName=toggleSaveLogin}" Header="{Binding Path=LocalizedResources.EnableBackgroundAgent, Source={StaticResource LocalizedStrings}}" Margin="0,0,24,0"/>
				<toolkit:ToggleSwitch IsChecked="{Binding Main.ShowToasts, Mode=TwoWay}" Style="{StaticResource ToggleSwitchTemplate}" IsEnabled="{Binding IsChecked, ElementName=toggleBackgroundTask}" Header="{Binding Path=LocalizedResources.EnableToastNotifications, Source={StaticResource LocalizedStrings}}" Margin="0,0,24,0"/>
        	</StackPanel>
        </Grid>
    </Grid>

</phone:PhoneApplicationPage>